package com.tcm.order.domain.enums;

/**
 *
 * Created by biuco on 2020/3/5.
 */
public enum AppraiseStatusEnum {
    WAIT_APPRAISE(0, "待评价"),
    BUYER_APPRAISE(1, "买家已评价"),
    SELLER_APPRAISE(2, "双方已评价"),
    APPEND_APPRAISE(3, "已追评");

    AppraiseStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private final int code;

    private final String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    /**
     * 判断定订单是否可卖家评价
     * @return
     */
    public static boolean ifSellerAppraise(int orderStauts) {
        return orderStauts == BUYER_APPRAISE.getCode();
    }

}
